<tagLib name="fanwe" />
<include file="Public:header" />
<script type="text/javascript" src="__TMPL__Static/Js/dataList.js"></script>
<script>
    function selectChild()
    {
        var value = $("#parent_id").val();
        if(value == "id1") 
            document.getElementById('child_id').innerHTML = "<select name='zp_biaoqian' id='child_id'><foreach name='my_list' item='category_item'><option value='{$category_item.tag_name}' >{$category_item.tag_name}</option></foreach></select>";
        else if(value=="id2") 
            document.getElementById('child_id').innerHTML = "<select name='zp_biaoqian' id='child_id'><foreach name='ml_list' item='category_item'><option value='{$category_item.tag_name}' >{$category_item.tag_name}</option></foreach></select>";
        else if(value=="id3") 
            document.getElementById('child_id').innerHTML = "<select name='zp_biaoqian' id='child_id'><foreach name='ot_list' item='category_item'><option value='{$category_item.tag_name}' >{$category_item.tag_name}</option></foreach></select>";
    }
    
</script>

<div class="handle-btns">
	<fanwe:linkBtn text="{%RETURN_LIST}" href="{:U(MODULE_NAME.'/index')}" />
</div>
<form method='post' id="form" name="form" action="{:U(MODULE_NAME.'/insert')}" enctype="multipart/form-data">
<table cellpadding="4" cellspacing="0" border="0" class="table-form">
	<tr>
		<th width="180">{%ZP_NAME}</th>
		<td><input type="text" class="textinput requireinput" name="zp_name" size="80" /></td>
	</tr>
        <tr>
		<th width="180">{%ZP_PINGPAI}</th>
		<td>
                    <table cellpadding="4" cellspacing="0" border="0" >
                        <tr style="none">
                            <td style="none">
                                <foreach name="q_list" item="tag">
                                    <label><input style="font-size: 16px" type="radio" name="zp_pingpai" value="{$tag.tag_name}"  /><span span style ="font-size: 16px"> {$tag.tag_name} </span></label>
                                </foreach>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                如若没有添加的品牌， <a href="{:U(GoodsCategory.'/index')}">点击此处添加</a>
                            </td>
                        </tr>
                        
                    </table>
                    
                </td>
	</tr>
        <tr>
		<th width="180">{%ZP_GONGXIAO}</th>
		<td>
                    <table cellpadding="4" cellspacing="0" border="0" >
                        <tr>
                            <td>
                                <foreach name="g_list" item="tag">
                                <label><input type="checkbox" name="zp_gongxiao[]" value="{$tag.tag_name}"  /><span span style ="font-size: 16px"> {$tag.tag_name} </span></label>
                                </foreach>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                如若没有相应的功效，<a href="{:U(GoodsCategory.'/index')}">点击此处添加</a>
                            </td>
                        </tr>
                    </table>
                    
                </td>
	</tr>
        <tr>
		<th width="180">{%ZP_BIAOQIAN}</th>
		<td>
                    <select name="parent_id" id="parent_id" onchange="selectChild()">
                        <option value ="id1">{%ZP_MEIYAN}</option>
                        <option value ="id2">{%ZP_MEILICZ}</option>
                        <option value ="id3">{%ZP_OTHERMZ}</option>
                    </select>
                     <select name="zp_biaoqian" id="child_id">
			<foreach name="my_list" item="category_item">
			<option value="{$category_item.tag_name}" >{$category_item.tag_name}</option>
			</foreach>
                    </select>

                </td>
	</tr>
        <tr>
		<th>{%ZP_PIC}</th>
		<td><input type="file" class="fileinput" name="zp_pic" size="30" /></td>
	</tr>
        <tr>
		<th width="180">{%ZP_PRICE}</th>
		<td><input type="text" class="textinput requireinput" name="zp_price" size="10"/></td>
	</tr>
        <tr>
		<th width="180">{%ZP_GUIGE}</th>
		<td><input type="text" class="textinput requireinput" name="zp_guige" size="10"/></td>
	</tr>
        <tr>
		<th width="180">{%ZP_JIESHAO}</th>
		<td><textarea name="zp_jieshao" class="textinput areainput" rows="5"></textarea> 可选</td>
	</tr>
        <tr>
		<th>{%SEO_KEYWORDS}</th>
		<td>
			<textarea name="seo_keywords" class="textinput areainput" rows="3"></textarea> 可选
		</td>
	</tr>
	<tr>
		<th>{%SEO_DESC}</th>
		<td>
			<textarea name="seo_desc" class="textinput areainput" rows="3"></textarea> 可选
		</td>
	</tr>
	<tr>
		<th>{%ZP_STATUS}</th>
		<td>
			<label><input type="radio" name="zp_status" value="1" checked="checked" /><span>{%YES}</span></label>
			<label><input type="radio" name="zp_status" value="0"/><span>{%NO}</span></label>
		</td>
	</tr>

	<tr class="act">
		<th>&nbsp;</th>
		<td>
			<input type="submit" class="submit_btn" value="{%SUBMIT}" />
			<input type="reset" class="reset_btn" value="{%RESET}" />
		</td>
	</tr>
</table>
</form>
<include file="Public:footer" />